import request from '@/utils/request'

// api地址
const api = {
  activeList: 'promote/activeList',
  updateViewsNum: 'promote/updateViewsNum',
  updateClickNum: 'promote/updateClickNum',
}

// 获取开启的活动列表
export const activeList = (param) => {
  return request.get(api.activeList, param, { load: false, isPrompt: false })
}

// 累积展现次数
export const updateViewsNum = (promoteId) => {
  return request.post(api.updateViewsNum, { promoteId }, { load: false, isPrompt: false })
}

// 累积点击次数
export const updateClickNum = (promoteId) => {
  return request.post(api.updateClickNum, { promoteId }, { load: false, isPrompt: false })
}